package com.wq.gof.designer.decorate;

import org.apache.log4j.Logger;

/**
 * @Author: wangqiang20995
 * @Date:2018/11/4
 * @Description:
 * @Resource:
 */
public class PersonClothing implements ClothingDecorate {
    private Logger logger = Logger.getLogger(getClass());

    @Override
    public void describeDecorator() {
        logger.info("一点装饰器都没有");
    }

    @Override
    public double cost() {
        return 0;
    }


    public static void main(String args[]) {
        ClothingDecorate paul = new JeansClothing(new ShirtClothing(new PersonClothing()));
        paul.describeDecorator();
        System.out.println("一身的衣服价格-->" + paul.cost());
        System.out.println("在穿上夹克");
        paul = new JackClothing(paul);
        System.out.println("穿上夹克之后的一身衣服的价格-->" + paul.cost());
    }
}
